package com.qf.ssm.result;

import lombok.Getter;
import org.apache.ibatis.jdbc.SQL;

@Getter
public enum ResultStatus {
    SUCCESS(20000, "成功"), //
    SYS_ERROR(40000, "系统错误"),

    USER_PARAM_ERROR(40001, "用户名格式不正确"),

    USER_NO_EXIST(40002, "用户名不存在"),

    USER_LOGIN_ERROR(40004, "用户名或者密码错误"),

    USER_ACCOUNT_ERROR(40005, "账号被禁用"),

    USER_PASSWORD_ERROR(40003, "密码错误"),

    IMAGE_UPLOAD_SUCCESS(200, "文件上传成功"),

    IMAGE_UPLOAD_ERROR(500, "文件上传失败"),

    IMAGE_SUFFIX_ERROR(400, "只允许上传jpg、jpeg、png格式的图片"),

    IMAGE_IS_NULL(40003, "文件不能为空"),


    SQL_UPDATE_ERROR(40007,"数据库修改错误"),
    TYPE_NO_EXIST(400046,"车辆类型不存在"),
    ADDRESS_ERROR(40007,"门店地址错误"),
    CUSTOMER_ERROR(40008,"顾客不存在"),
    STATUS_ERROR(4009,"状态不存在"),
    STATUS_UPDATE_ERROR(4010,"状态修改失败"),
    USER_EXIST(4010,"账号已存在"),
    NO_DATA(4011,"数据为空"),
    SQL_INSERT_ERROR(40008 ,"数据添加失败"),
    SQL_DELETE_ERROR(40009,"数据删除失败"),
    FILE_UP_ERROR(40009,"文件上传失败"),
    INFO_NO_EXIST(430001,"车辆信息不存在"),
    BRAND_NO_EXIST(431001,"车辆品牌查询失败"),
    RANT_ADD_ERROR(401001,"添加租金主信息失败"),
    CustomRent_ADD_ERROR(401002,"添加自定义日期租金失败"),
    RANT_UPDATE_ERROR(401001,"修改租金主信息失败"),
    CustomRent_UPDATE_ERROR(401002,"修改自定义日期租金失败"),
    DispatchRecode_ADD_ERROR(420001,"车辆调度信息添加失败"),
    DispatchRecode_UPDATE_ERROR(420002,"车辆调度状态修改失败"),
    CAR_UPDATE_STOREID_ERROR(420003,"车辆所属门店修改失败"),
    SQL_INSERT_CUSTOMER(40008 ,"身份证或者电话号码已经存在"),




    FILE_UP_SUCCESS(40009,"文件上传成功"),

    FILE_IS_NULL(40011, "空文件"),
    FILE_SUFFIX_ERROR(40015, "文件上传格式错误"),




    GET_DATA_ERROR(40012,"获取失败"),
    UPDATE_ERROR(40013,"修改失败"),
    CREATE_ERROR(40014,"创建失败"),


    FILE_DOWNLOAD_FAILURE(600,"文件下载失败");




    final int code;
    final String msg;

    ResultStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
